package org.learn.test;
import java.util.Scanner;
public class HomeWork04 {
    public static void main(String[] args) {
        //输入一个数，判断是不是水仙花数
    Scanner myScanner = new Scanner(System.in);
    System.out.println("请输入一个整数");
    int a = myScanner.nextInt();
    int b = a / 100;
    int c = (a - (b * 100)) / 10;
    int d = a - (b * 100) -(c * 10);
    if(a == b * b * b + c * c * c + d * d * d)
    {
        System.out.println(a + "是水仙花数");
    }
    else{
        System.out.println(a + "不是水仙花数");
        }
    }
}
